Skip to content

mind: correct and close out the autofit all-ones ell_comps bug - #184

Merged
Jammy2211 merged 4 commits into
mainfrom
claude/autofit-mock-ones-parameters-bug-sv303m
Aug 13, 2026
Merged

mind: correct and close out the autofit all-ones ell_comps bug#184
Jammy2211 merged 4 commits into
mainfrom
claude/autofit-mock-ones-parameters-bug-sv303m

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

What this is

Rewrites draft/bug/autofit/mock_all_ones_parameters_break_ell_comps_guard.md after running the investigation it asked for. The fix itself is PyAutoFit#1471 and PyAutoGalaxy#569.

Why the prompt needed correcting

Its root-cause theory was wrong in three material ways, and would have sent a developer down a dead end:

  • "The path runs through serialization into the database and back out through the aggregator." No database round-trip is involved. The exception is raised inside search.fit(...), before af.Aggregator.from_database is ever called.
  • "_fit_fast evaluates at [prior.mean ...], which is 0.0 for ell_comps — valid." The vector is fine. The crash is on the very next line (mock_search.py:82, self.result.instance), which builds an instance from the summary.
  • "MockSamplesSummary.default() … not a dict of 1.0s." Correct, and that is why the search-side summary was a dead end — but the reaching path is MockResult's fallback MockSamplesSummary(model=model), a different construction site the prompt never checked.

The prompt's "DISPROVEN — do not re-tread" note about parameter_list_with_physical_ell_comps stands and is preserved: model.all_paths and model.unique_prior_paths are both sorted by prior id, so its index alignment is correct.

Also recorded

  • The reported symptom was already gone. The 7 scripts were fixed in the workspace repos on 2026-08-10 18:54 (autogalaxy_workspace_test docs: plan the multi_galaxy/group/cluster lensing-regime split (epic + 9 child prompts) #104, autolens_workspace_test prompt: record latex-raw-string-docstrings as shipped (#491) #256) — hours after Heart run 31356506626 sampled them. The ticket was filed against stale evidence.
  • A second defect found along the way: ag.m.MockResult dropped samples_summary from its signature, so callers could not avoid the bad fallback at all. That is PyAutoGalaxy#569.
  • Reproduction is not blocked from a cloud session. The prompt said the stack could not be installed there. It can — the recipe is now in the file. Install the released stack for its dependency closure, then shadow the libraries via PYTHONPATH (an editable install is refused on Python 3.11 because autonerves now requires >=3.12).
  • Resized from too-large (score 17) to small. The original sizing assumed 3-repo library+workspace coordination; the workspace half was already shipped.

Remaining scope is narrowed to one optional tidy-up: having MockSearch inherit samples_summary from a passed-in result rather than silently defaulting. No longer a correctness issue after the fix, and it touches ~55 call sites, so it belongs in its own change.


Generated by Claude Code

claude added 4 commits August 13, 2026 05:34
…ot cause

Ran the investigation end-to-end against library main: the crash is in
MockResult's fallback MockSamplesSummary(model=model), consumed by
Result.instance inside search.fit() — not a database/aggregator round-trip.
Records the validated fix, the three-suite regression evidence, the
ag.m.MockResult API-narrowing wart, and a cloud-session repro recipe.
Resizes the task from too-large to small: the workspace half already shipped.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XqpBSWF2JDx4L9g1YCQk67
Implemented on claude/autofit-mock-ones-parameters-bug-sv303m in PyAutoFit
(prior_median_kwargs helper + 4 regression tests) and PyAutoGalaxy
(MockResult forwards samples_summary). Records the post-implementation
three-suite validation and narrows remaining scope to one optional tidy-up.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XqpBSWF2JDx4L9g1YCQk67
PyAutoFit#1471 and PyAutoGalaxy#569 both merged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XqpBSWF2JDx4L9g1YCQk67
@Jammy2211
Jammy2211 merged commit 3cd074e into main Aug 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants